//这是入口文件
import Vue from 'vue'

//导入app组件

import app from './app.vue'

//按需导入Mint-ui中的组件
import {Header,Swipe,SwipeItem,Button} from "mint-ui"


import './lib/dist/css/mui.min.css'
import './lib/dist/css/icons-extra.css'

import 'bootstrap/dist/css/bootstrap.css'

//导入路由包
//导入组件的router.js
import router,{VueRouter} from './router'
import VueResource from 'vue-resource'
Vue.config.silent = true
Vue.use(VueRouter)
Vue.use(VueResource)
Vue.component(Header.name,Header)
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button);
Vue.http.options.emulateJSON = true;

Vue.filter("dataFormat",(data,pattern="YYYY-MM-DD HH:mm:ss")=>{
  let reg = /\d{2,4}/g
  return data.toString().match(reg)[1]+'-'+data.toString().match(reg)[0]
})
const vm = new Vue({
  render:c=>c(app),
  router
}).$mount('.app')

